Page({
  clickDivider(e){
    let {index} = e.currentTarget.dataset
    this.setData({
      selectedIndex: index
    })
  },
  clickReversed(){
    this.setData({reversed: !this.data.reversed})
  },

  changeSlider(e){
    console.log(`值为`, e.detail.value)
    let {name} = e.currentTarget.dataset
    const params = {}
    params[name] = e.detail.value
    this.setData(params)
  },
  /**
   * 页面的初始数据
   */
  data: {
    selectedIndex: 0,
    angle: 6,
    reversed: false,
    curve: 20,
    spikesSize: 50,
    spikesLeft: 50,
    triangleSize: 50,
    triangleLeft: 50,

    semicircleWidth: 100,
    semicircleHeight: 100,
    semicircleLeft: 50,
    semicircleTop: 50,
    divider: [
      "https://wweb.dev/resources/css-separators/skewed.png",
      "https://wweb.dev/resources/css-separators/semicircle.png",
      "https://wweb.dev/resources/css-separators/wave.png",
      "https://wweb.dev/resources/css-separators/spikes.png",
      "https://wweb.dev/resources/css-separators/triangle.png",
      "https://wweb.dev/resources/css-separators/curved.png",
    ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
    
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
    
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
    
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
    
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
    
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
    
  }
})